import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../views/index.vue'
import detail from '../views/detail.vue'
import login from '../views/login.vue'
import logindetail from '../views/logindetail.vue'
import modify from '../views/modify.vue'
import myCollection from '../views/myCollection.vue'
Vue.use(VueRouter)

const router = new VueRouter({
	routes:[
		{
			path:'/',
			component:index,
			meta:{
				login:false
			}
		},
		{
			path:'/detail',
			component:detail,
			meta:{
				login:false
			}
		},
		{
			path:'/login',
			component:login,
			meta:{
				login:false
			}
		},
		{
			path:'/logindetail',
			component:logindetail,
			meta:{
				login:true
			}
		},
		{
			path:'/modify',
			component:modify,
			meta:{
				login:true
			}
		},
		{
			path:'/myCollection',
			component:myCollection,
			meta:{
				login:true
			}
		}
	]
})
// router.beforeEach(to,from,next)
export default router